package net.sky.oa.test.dao.addrbook;

import java.util.List;

import javax.annotation.Resource;

import net.sky.oa.dao.addrbook.AddGroupDao;
import net.sky.oa.model.AddGroup;
import net.sky.oa.test.BaseTestCase;

import org.junit.Test;
import org.springframework.test.annotation.Rollback;

public class AddGroupDaoTestCase extends BaseTestCase {

	@Resource
	private AddGroupDao addGroupDao;

	@Test
	@Rollback(false)
	public void add() {
		AddGroup addGroup = new AddGroup();

		addGroup.setName("GrouphondName");
		addGroup.setStatus(1);
		this.addGroupDao.save(addGroup);
	}

	@Test
	@Rollback(false)
	public void find() {

		List<AddGroup> groups = this.addGroupDao.findAllGroup();
		for (AddGroup group : groups) {
			System.out.println("getName:" + group.getName());
		}
	}
}